package com.victor.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 投票表
 * 
 * @author Mr.Zhang
 *
 */
@Entity
@Table(name = "vote")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Vote implements Serializable {
	
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY) // 主键类型--自动递增生成
	@Column(name = "id", unique = true, nullable = false, length = 11)
	private Integer id;// 主键id
	
	@Column(name = "userid", length = 11)
	private String userid;// userid
	
	@Column(name = "picname", length = 50)
	private String picname;//投票的书的名字
	
	@Column(name = "author", length = 50)
	private String author;// 作者
	
	@Column(name = "agegroup", length = 2)
	private String agegroup;// 年龄段(
							// 1.2-3,
							// 2.4-5,
							// 3.6-7,
							// 4.8-9,
							// 5.10-11,
							// 6.12以上,
							// 7.大班,
							// 8.小班,
							// 9.低年级,
							// 10.中年级,
							// 11.高年级
							// )
	
	@Transient
	private String pid;// picbookid
}
